package itheime.com.fileDemo;

import java.io.File;
import java.io.IOException;

public class Test4 {
    public static void main(String[] args) throws IOException {
//        File file = new File("Day11\\aa\\a.txt");
       /* boolean newFile = file.createNewFile();
        System.out.println(newFile);*/
       //只能创建单级文件，不能创建文件夹

//        File file = new File("Day11\\bb");
////        System.out.println(file);
//        if(!file.exists()){
//            file.mkdirs();
//        }
//
//        File file1 = new File(file,"a.txt");
//        boolean newFile = file1.createNewFile();
//        System.out.println(newFile);

        File file = new File("Day11\\aa\\a.txt");
        boolean delete = file.delete();

        System.out.println(delete);

        File file1 = new File("Day11\\aa");
        boolean delete1 = file1.delete();
        System.out.println(delete1);
    }
}
